home *** CD-ROM | disk | FTP | other *** search
/ Scene 96 / Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso / misc / utilz / unpcklbm / pmode.inc < prev    next >
Text File  |  1996-01-01  |  2KB  |  71 lines

  1. extrn   v86r_eax:dword, v86r_ebx:dword, v86r_ecx:dword, v86r_edx:dword
  2. extrn   v86r_esi:dword, v86r_edi:dword, v86r_ebp:dword
  3. extrn   v86r_ah:byte, v86r_al:byte, v86r_bh:byte, v86r_bl:byte
  4. extrn   v86r_ch:byte, v86r_cl:byte, v86r_dh:byte, v86r_dl:byte
  5. extrn   v86r_ax:word, v86r_bx:word, v86r_cx:word, v86r_dx:word
  6. extrn   v86r_si:word, v86r_di:word, v86r_bp:word
  7. extrn   v86r_ds:word, v86r_es:word, v86r_fs:word, v86r_gs:word
  8. extrn   _selcode:word, _seldata:word, _selzero:word, _lomembase:dword
  9. extrn   _lomemtop:dword, _himembase:dword, _himemtop:dword, _pspa:dword
  10. extrn   _code16a:dword, _code32a:dword, _getirqvect:dword, _setirqvect:dword
  11. extrn   _sysbyte0:byte, _setselector:dword, _exitcode:byte
  12.  
  13. Extrn _Filebufloc:Dword,_Filebuflen:Word,_Closefile:Near,_Createfile:Near,_CreateHiddenfile:Near
  14. Extrn _Openfile:Near,_Deletefile:Near,_Lseekfile:Near,_Filesize:Near
  15. Extrn _Readfile:Near,_Writefile:Near,_Filecopy:Near,_Findfile:Near,_renfile:Near
  16.  
  17. extrn   _getmem:near, _getlomem:near, _gethimem:near, _lomemsize:near
  18. extrn   _himemsize:near, _ret:near, _exit:near, _getirqmask:near
  19. extrn   _setirqmask:near, _rmpmirqset:near, _rmpmirqfree:near
  20. extrn   _getselector:near, _freeselector:near
  21.  
  22. ; Convert physical pointer to realative pointer
  23. Move    macro reg, ptr
  24.     mov ®,&ptr
  25.     sub ®,_code32a
  26. endm
  27.  
  28. ; Convert relative pointer to physical pointer
  29. @php    macro reg, ptr
  30.     mov ®,&ptr
  31.     add ®,_code32a
  32. endm
  33.  
  34. ; Output a byte to DX
  35. @outb           macro   val
  36.     mov al,&val
  37.     out dx,al
  38. endm
  39.  
  40. ; Output a word to DX
  41. @outw           macro   val
  42.     mov ax,&val
  43.     out dx,ax
  44. endm
  45.  
  46.  
  47. ; Get interrupt flag status
  48. @gif    macro
  49.     mov ax,902h
  50.     int 31h
  51. endm
  52.  
  53. ; Get interrupt flag status and clear
  54. @gifc   macro
  55.     mov ax,900h
  56.     int 31h
  57. endm
  58.  
  59. ; Get interrupt flag status and set
  60. @gifs   macro
  61.     mov ax,901h
  62.     int 31h
  63. endm
  64.  
  65. ; Get interrupt flag status and set to AL (0=clear, 1=set)
  66. @gifal  macro
  67.     mov ah,9
  68.     int 31h
  69. endm
  70.  
  71.